package Assignment;

public class Test1 {
    public static void main(String[] args) {
        double price = 7988;

        //手机放二手市场卖掉，1500
        double x = price - 1500;
        //以旧换新，8折
        double y = price * 0.8;

        if (x>y){
            System.out.println("以旧换新更划算,只需要："+y+"元");
        } else if (y>x) {
            System.out.println("将旧手机放二手市场卖掉更换算，只需要："+x+"元");

        }else {
            System.out.println("都差不多，只需要"+x+"元");
        }
    }
}
